<template>
  <div class="wrapper">
    <user-list :identity="2" :engineeringSupervisionList="engineeringSupervisionList"
      :permission="permission"></user-list>
  </div>
</template>

<script>
import userList from "@/components/UserList/index.vue";
import adminApi from "@/api/adminApi";

export default {
  name: "",
  components: {
    userList,
  },
  data() {
    return {
      permission: [],
      engineeringSupervisionList: []
    };
  },
  mounted() {
    this.$getHtmlAuthority(this.$route.path).then(res => {
      console.log(res, "getHtmlAuthority");
      this.permission = res.data.permission;
    })
    this.getAdminList();
  },
  methods: {
    getAdminList() {
      var obj = {
        page: 1,
        num: 9999,
        keyword: '',
        province_id: "",
        city_id: "",
        county_id: "",
        identity: 1,
        position_id_arr: [8]
      };
      adminApi.getAdminList(obj).then((res) => {
        console.log(res, "工程监理");
        if (res.code == 200) {
          this.engineeringSupervisionList = res.data.list;
        } else {
          this.$message({
            message: res.message,
            type: "warning",
          });
        }
      }).catch((err) => { });
    },
  },
};

</script>

<style lang="scss" scoped></style>
